package ru.royalgatemagazine.app.utils;

import android.app.Activity;
import android.content.Intent;
import android.net.Uri;

public class Utils {
	
	public static void sendEmail(Activity activity, String email){
		 final Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND);
         emailIntent.setType("plain/text");
         emailIntent.putExtra(android.content.Intent.EXTRA_EMAIL, new String[]{email});
         activity.startActivity(Intent.createChooser(emailIntent, "Send mail"));
	}
	
	public static void openUrl(Activity activity, String url){
		Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
		activity.startActivity(browserIntent);
	}
	
}
